//
//  TopicModel.h
//  DaJiang
//
//  Created by sally on 16/10/25.
//  Copyright © 2016年 jiniu. All rights reserved.
//

#import "BussinessModel.h"

/**
 *  话题实体
 */
@class TopicData;
@class UserModel;
@interface TopicModel : BussinessModel

@property (nonatomic, assign) NSInteger topicid;
@property (nonatomic, assign) NSInteger uid;
@property (nonatomic, assign) NSInteger created_at;
@property (nonatomic, assign) NSInteger updated_at;
@property (nonatomic, strong) TopicData *data;
@property (nonatomic, strong) UserModel *user;

//管理话题列表
+ (void)queryTopicListWithCursor:(NSInteger)cursor
                      completion:(void (^)(NSMutableArray *topicList))completion;

//修改话题
+ (void)addOrUpdateTopicWithTopicId:(NSInteger)topicId
                          topicName:(NSString *)topicName
                         timeLength:(NSString *)timeLength
                          topicDesc:(NSString *)topicDesc
                         topicPrice:(NSString *)topicPrice
                         completion:(void (^)(TopicModel *topicModel))completion;

//删除话题
+ (void)deleteTopicWithTopicId:(NSInteger)topicId
                    completion:(void (^)(BOOL isSucceed))completion;

@end

@interface TopicData : BussinessModel

@property (nonatomic, strong) NSString *topic_name;
@property (nonatomic, assign) CGFloat topic_price;
@property (nonatomic, strong) NSString *user_pro_topic_index;
@property (nonatomic, strong) NSString *user_pro_topic_index2;
@property (nonatomic, strong) NSString *time_length;
@property (nonatomic, strong) NSString *topic_desc;
@property (nonatomic, strong) NSString *pro_user_location_name;
@property (nonatomic, assign) NSInteger avaliable; //0正常（已上架），1下线（已下线）
@property (nonatomic, assign) NSInteger consulting_count; //咨询话题个数
@property (nonatomic, assign) CGFloat pro_topic_consulting_comment_avg_value; //平均分

@end
